jQuery(document).ready(function () {
    TableManaged.init();
});
$("#info_disabled,#info_res,#info_delete").click(function () {
    var act = $(this).attr('id');
    if (act == 'info_disabled') {
        act = 2;
    }
    if (act == 'info_res') {
        act = 1;
    }
    if (act == 'info_delete') {
        act = -1;
    }
    var ids = $("span[class='checked'] input").serialize();
    if(ids == ''){
        dshow('请选择操作对象');
        return
    }
    ids = decodeURIComponent(ids, true);
    if(confirm('确认执行操作？')){
        $.ajax({
            url: '/admin/Admin/set',
            type: 'POST',
            data: {ids: ids, act: act},
            dataType: 'JSON',
            cache: false,
            success: function (json) {
                dshow(json.message);
                if (json.code == 2000) {
                    window.location.href = '/admin/Admin';
                }
            }
        });
    }
});